package com.liang.springcloud.service;

import com.liang.springcloud.entities.CommonResult;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @description:
 * @author: 史德亮
 * @time: 2020/11/10 10:57
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE",fallback = FallbackService.class)
public interface PaymentService {

    @GetMapping("/payment/get/{id}")
    CommonResult getPaymentById(@PathVariable("id")Long id);

    @GetMapping("/payment/hystrix/ok/{id}")
    String payment_ok(@PathVariable("id") Integer id);



    @GetMapping("/payment/hystrix/timeOut/{id}")
    String payment_timeOut(@PathVariable("id") Integer id);
}
